package org.batatasframework.web.element;


public class Select extends AbstractElementCollection<SelectOption>{

	public Select() {
		super("select");
	}

	@Override
	protected SelectOption createElement() {
		return new SelectOptitem();
	}
	
	public SelectOption group(SelectOptitem ...items){
		return addElement(new SelectOptgroup(items));
	}
	
	public SelectOption option(SelectOptitem item){
		return addElement(item);
	}

	public SelectOption option(Object value, String text){
		return addElement(new SelectOptitem(value).append(text));
	}

	public SelectOption option(SelectOptitem... items){
		return addElement(items);
	}
}
